package main

import (
	"fmt"
	"net/http"
	"os"

	"gitlab.com/solsw/cloudru/objectstorage"
)

func main() {
	rq, _ := http.NewRequest(http.MethodGet, "https://s3.cloud.ru", nil)
	rq.Header.Set("Host", "s3.cloud.ru")
	rq.Header.Set("X-Amz-Expires", "86400")
	a, err := objectstorage.Authorization(rq,
		[]string{"Host", "X-Amz-Expires"},
		os.Getenv("CLOUDRU_KEY_ID"),
		os.Getenv("CLOUDRU_KEY_SECRET"),
		os.Getenv("CLOUDRU_TENANT_ID"),
	)
	if err != nil {
		panic(err)
	}
	fmt.Println(a)
}
